package io.lvdaxian.handwriting.thread01;

public class Thread19 {
  public static boolean flag = true;
  
  public static void main(String[] args) throws InterruptedException {
    new Thread(() -> {
      while (flag) {
      }
      System.out.println("子线程执行完毕");
    }).start();
    
    Thread.sleep(1000);
    flag = false;
  }
}